﻿<UserControl x:Class="EzDesk.DesktopClient.MessageModule.FeedView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition  Height="auto"></RowDefinition>
            <RowDefinition  Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <Border Grid.Row="0"  Style="{StaticResource LabelBorder}" >
            <Grid>
                <TextBlock Margin="5,0,0,0" Text="{StaticResource UpdateMessage}"/>
                <TextBlock Margin="0,0,5,0"  HorizontalAlignment="Right">
                    <Run Text="10"></Run>/<Run Text="256"></Run>
                </TextBlock>
            </Grid>
        </Border>
        
        <ScrollViewer x:Name="scrFeedList" Grid.Row="1"  HorizontalContentAlignment="Stretch" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
            <ListBox  x:Name="listboxFeedList" ItemsSource="{Binding UpdateFeeds}" ItemContainerStyle="{StaticResource NonSelectedStyleListBoxItem}"   VirtualizingStackPanel.VirtualizationMode="Recycling" Mouse.PreviewMouseWheel="listboxFeedList_PreviewMouseWheel" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <ContentControl Content="{Binding View}" Width="{Binding ActualWidth,ElementName=listboxFeedList}" ></ContentControl>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </ScrollViewer>
    </Grid>
</UserControl>
